<template>
  <div>
    <div class="recommend-title">
      热销推荐
    </div>
    <ul>
        <li class="recommend-list border-bottom"
          v-for="item in list"
          :key="item.id">
          <img class="recommend-list-img" :src="item.imgUrl" />
          <div class="recommend-list-info">
            <p class="title">{{item.title}}</p>
            <p class="desc">{{item.desc}}</p>
            <p>
              <button class="button">查看详情</button>
            </p>
           </div>
        </li>
    </ul>
    <div class="recommond-more">
      查看所有产品
    </div>
  </div>
</template>

<script>
export default {
  name: 'HomeRecommend',
  props: {
    list: Array
  }
}
</script>

<style lang="stylus">
  @import '~styles/varibles.styl'
  @import '~styles/mixis.styl'
  .recommend-title
    height: .8rem
    line-height: .8rem
    background: #eee
    text-indent: .2rem
  .recommend-list
    overflow: hidden
    height: 1.9rem
    .recommend-list-img
      width: 1.7rem
      height: 1.7rem
      padding: .1rem
      float: left
    .recommend-list-info
      padding: .2rem
      .title
        font-size: .32rem
        height: .54rem
        ellipsis()
      .desc
        height: .54rem
        color: #ccc
        ellipsis()
      .button
        width: 1.4rem
        background: #ff9300
        color: #fff
        border-radius: .06rem
  .recommond-more
    height: .6rem
    line-height: .6rem
    text-align: center
    color: #00AFC7
</style>
